package com.example.userservice.repository;


import com.example.userservice.entity.UserEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.Optional;

public interface UserRepository extends JpaRepository<UserEntity, Long> {
    Optional<UserEntity> findByUsername(String username); // 返回Optional
    boolean existsByUsername(String username);
    boolean existsByEmail(String email);
}